import {request as Request} from "./Ajax";
import API from "./API";
import CustomError from "../utils/CustomError";

module.exports = {
    /*
    * 站点配置
    * */
    config: async function (data = {}) {
        try {
            return await Request({
                url: API.config,
                data
            })
        } catch (e) {
            throw new CustomError (e, "System.config").parse()
        }
    },

    /*
    * 站点图片配置
    * */
    imgConfig: async function () {
        try {
            return await Request({
                url: API.imgConfig
            })
        } catch (e) {
            throw new CustomError (e, "System.imgConfig").parse()
        }
    },
}